﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HumanResources
{
    public class EventLogger
    {
        private string filename;
        public EventLogger(string filename)
        {
            this.filename = filename;
        }

        public void logEvent (String desc, object data)
        {
            System.IO.StreamWriter outfile = 
                new System.IO.StreamWriter(filename, true);
            outfile.WriteLine("{0} - {1}: [{2}]", DateTime.Now,
                desc, data);
            outfile.Flush();
            outfile.Close();
        }
    }
}
